public function actionAsync()
    {
        if (($lockout = $this->sessionBruteForceLock())) {
            return $this->sendArray(false, [Module::t('login_async_submission_limit_reached', ['time' =>  Yii::$app->formatter->asRelativeTime($lockout)])]);
        }
        
        // get the login form model
        $model = new LoginForm();
        $model->allowedAttempts = $this->module->loginUserAttemptCount;
        $model->lockoutTime = $this->module->loginUserAttemptLockoutTime;
        
        $loginData = Yii::$app->request->post('login');
        Yii::$app->session->remove('secureId');
        // see if values are sent via post
        if ($loginData) {
            $model->attributes = $loginData;
            if (($userObject = $model->login()) !== false) {
                // see if secure login is enabled or not
                if ($this->module->secureLogin) {
                    // try to send the secure token to the given user email store the token in the session.
                    if ($model->sendSecureLogin()) {
                        Yii::$app->session->set('secureId', $model->getUser()->id);
                        return $this->sendArray(false, [], true);
                    }
                    
                    return $this->sendArray(false, ['Unable to send and store secure token.']);
                }
                
                if (Yii::$app->adminuser->login($userObject)) {
                    return $this->sendArray(true);
                }
            }
        }

        return $this->sendArray(false, $model->getErrors(), false);
    }