public function isAuthenticated()
    {
        // Validate token.
        $authenticated = $this->validateToken($this->getCookieToken());
        if ($authenticated) {
            $this->setCookieToken($this->dispenseToken()); // Dispense a new token.
        }
        return $authenticated;
    }