public function authenticate($force=false)
	{
        // Setup everything first
		$this->setup($force);

        // If something bad happened during the setup process, immediately bail with the error code
        if ($this->errorCode != NULL)
            return !$this->errorCode;

        // Validate the users password
        $this->validatePassword();

        // If this user has 5 or more failed password attempts
        if ($this->_attempts->value >= 5)
        {
            // And if they the updated time is still more than 15 minutes ago
            if ((strtotime($this->_attempts->updated) + strtotime("+15 minutes")) >= time())
            {
                // Resave the attempts model so that the updated time is reset
                $this->_attempts->save();

                // Throw an unknown identity error
                $this->errorCode = self::ERROR_UNKNOWN_IDENTITY;
            }
            else
            {
                // Automatically re-adjust the lockout time if this has passed.
                $this->_attempts->value = 0;
                $this->_attempts->save();
            }
        }

        // If the user needs two factor authentication
        if ($this->getUser()->needsTwoFactorAuth())
        {
            // If the code isn't supplied, throw an error
            if ($this->twoFactorCode === false)
               $this->errorCode = self::REQUIRE_TWO_FACTOR_AUTH;
            else
            {
                // If the 2fa code is supplied, verify it
                if (!$this->validateTwoFactorCode())
                    $this->errorCode = self::INVALID_TWO_FACTOR_AUTH;
            } 
        }

        // At this point, we should should know if the validation has succeeded or not. If the errorCode has been altered, immediately bail
        if ($this->errorCode != NULL)
            return !$this->errorCode;
        else
            $this->setIdentity();

        return !$this->errorCode;
    }