code: public function actionLogin()
  	{
  		// If the user is logged in, redirect to dashboard
  		if (!Yii::$app->user->isGuest)
  			return $this->redirect(Yii::$app->user->returnUrl);
  
  		$model = new AccountLoginForm();
  
  		if ($model->load(Yii::$app->request->post()) && $model->validate() && $model->login())
  			return $this->redirect(Yii::$app->user->returnUrl);
  
  		return $this->render('login', [
  			'model'              => $model,
  			'canRegister'        => UserModule::$canRegister,
  			'canRecoverPassword' => UserModule::$canRecoverPassword
  		]);
  	}
docs: Displays the login page.
  
  @return string|\yii\web\Response