public function ajaxauthenticateAction()
    {
        // $this->getServiceLocator()->get('Zend\Log')->info('ajaxloginAction -
        // AUTHENT : ');
        if ($this->zfcUserAuthentication()
            ->getAuthService()
            ->hasIdentity()) {
            return true;
        }
        $adapter = $this->zfcUserAuthentication()->getAuthAdapter();
        $adapter->prepareForAuthentication($this->getRequest());
        $auth = $this->zfcUserAuthentication()->getAuthService()->authenticate($adapter);

        if (! $auth->isValid()) {
            $adapter->resetAdapters();

            return false;
        }

        $user = $this->zfcUserAuthentication()->getIdentity();

        if ($user->getState() && $user->getState() === 2) {
            $this->getUserService()->getUserMapper()->activate($user);
        }
        $this->getEventManager()->trigger('login.post', $this, array('user' => $user));
        return true;
    }