protected function _initAuth()
{
if (Configure::read('Users.auth')) {
//initialize Auth
$this->_registry->getController()->loadComponent('Auth', Configure::read('Auth'));
}
$this->_registry->getController()->Auth->allow(['register', 'validateEmail', 'resendTokenValidation', 'login', 'twitterLogin', 'socialEmail', 'resetPassword', 'requestResetPassword', 'changePassword', 'endpoint', 'authenticated', 'verify']);
}