public function logout()
    {
        $authService = $this->getServiceManager()->get('zfcuser_auth_service');
        $user = $authService->getIdentity();

        $cookie = explode("\n", $this->getRememberMeService()->getCookie());

        if ($cookie[0] !== '' && $user !== null) {
            $this->getRememberMeService()->removeSerie($user->getId(), $cookie[1]);
            $this->getRememberMeService()->removeCookie();
        }
    }