unsetAll(); $adminSession->getCookie()->delete($adminSession->getSessionName()); $route = ((bool)(string)Mage::getConfig()->getNode(Mage_Adminhtml_Helper_Data::XML_PATH_USE_CUSTOM_ADMIN_PATH)) ? Mage::getConfig()->getNode(Mage_Adminhtml_Helper_Data::XML_PATH_CUSTOM_ADMIN_PATH) : Mage::getConfig()->getNode(Mage_Adminhtml_Helper_Data::XML_PATH_ADMINHTML_ROUTER_FRONTNAME); Mage::app()->getResponse() ->setRedirect(Mage::getBaseUrl() . $route) ->sendResponse(); exit(0); } }