public function authenticate()
    {
     Logger::get()->debug('Authenticating OpenID user...');
        if (!$this->isAuthenticated) {
            if (!static::getConsumer()->validate()) {
             Logger::get()->debug('  Failed!');
                throw new NotAuthenticatedException('OpenID authentication failed.');
            } else {
                $this->isAuthenticated = true;
            }
        }

     Logger::get()->debug('  OK!');
    }