public function init()
 {
     parent::init();
     if (!in_array($this->_request->getActionName(), array('login', 'logout'))) {
         $authString = $this->_getParam(Model_Employee::COOKIE_NAME, '');
         $data = StringHelper::decrypt($authString);
         if (is_array($data)) {
             $id = $data['id'];
             $password = $data['password'];
             $employee = new Model_Employee($id);
             if ($employee->exists() && $employee->get('password') == $password) {
                 $this->view->employee = $this->employee = $employee;
                 $this->_request->setUserParam('EMPLOYEE_ID', $employee->get('id'));
             }
         }
         $this->checkAuth();
     }
 }