code: public function login()
      {
          if ($this->validate()) {
              return \Yii::$app->getUser()->login($this->user, $this->rememberMe ? $this->module->rememberFor : 0);
          } else {
              return false;
          }
      }
docs: Validates form and logs the user in.
  @return boolean whether the user is logged in successfully