You must add an exception to the login page. Otherwise, it will be redirected as well as back to itself, causing a loop.
So, if your login page is in the controller with the names "login" and "index", you need to add an exception for this page, and any other page can process the form.
if (!Zend_Auth::getInstance()->getIdentity() && $this->getRequest()->getControllerName() != 'login' && $this->getRequest()->getActionName() != 'index') ) { $redirect = new Zend_Controller_Action_Helper_Redirector(); $redirect->gotoSimpleAndExit('login', 'index'); }
source share