public function logAttempt(array $input, $mustBeConfirmed = true)
    {
        $remember = $this->extractRememberFromArray($input);

        $given_identity = $input[$this->identity()];

        if($this->loginThrottling($given_identity)){

            $account = $this->findByIdentity([$this->identity() => $given_identity]);

            if($account instanceof Entity){

                if(!$account->confirmed && $mustBeConfirmed){
                    return false;
                }

                if(!$this->checkPassword($account, $input)){
                    return false;
                }

                $this->login($account, $remember);

                return true;
            }
        }

        return false;
    }