/**
  * Limit access to protected actions.
  */
 public function preDispatch()
 {
     parent::preDispatch();
     if (!$this->getRequest()->isDispatched()) {
         return;
     }
     $action = $this->getRequest()->getActionName();
     $openActions = array('applyPlan');
     $pattern = '/^(' . implode('|', $openActions) . ')/i';
     $this->_session = Mage::getSingleton('customer/session');
     if (!preg_match($pattern, $action)) {
         if (!$this->_session->authenticate($this)) {
             $this->setFlag('', 'no-dispatch', true);
         }
         Mage::register('current_customer', $this->_session->getCustomer());
     } else {
         $this->_session->setNoReferer(true);
     }
 }