protected function reinitializeUserSession(Framework $framework, WebRequest $request, Response $response)
    {
        $token = $request->getSessionData('userSessionToken');
        $lifetime = $request->getSessionData('userSessionTokenLifetime');
        
        list($notValid, $token, $lifetime, $userUuid) = $this->verifyToken($request, $token, $lifetime);

        // We do not load any user session because this session isn't 
        // okey. Our session token is not set or the lifetime is invalid or expired.
        // This is maybe an expired session or a hijacking attack...
        if ($notValid) {
            $this->cleanupSession($request);
            $this->regenerateSession($request);
            
            return false;
        }
        
        // Load the user
        $user = $this->userManager->getUserForUuid($userUuid);
        
        // If the user is disabled we cannot initialize the session
        if (!$user->hasAccess('\\Global\\*') && $user->hasAccess('\\Global\\Disabled')) {
            return false;
        }

        // Generate a new session object
        $session = new Session($user, $token, $lifetime);
        $request->setSession($session);

        // Generate a new token if the lifetime expires soon...
        if ($lifetime - 30 < time()) {
            $this->initializeUserSession($request, $response, $user);
        }

        return true;
    }