title: Yii2 Auto login after registration
body: <p>How can I achieve auto login after registration in yii2? In yii1, we achieved this through user Identity, but now I couldn't find it.</p>
  
  <p><strong>MY controller</strong>  </p>
  
  <pre><code>public function actionCreate()
  {
      $model = new User();
  
      if ($model-&gt;load(Yii::$app-&gt;request-&gt;post()) &amp;&amp; $model-&gt;save()) {
           Yii::$app-&gt;session-&gt;setFlash('success', 'Please Login with Email/Password!');
  
          return $this-&gt;redirect('../site/login');
      } else {
          return $this-&gt;render('create', [
              'model' =&gt; $model,
          ]);
      }
  }  
  </code></pre>
  
  <p>If registration is successful, I want to auto login instead of going site login.</p>