protected function controlMaintenanceMode()
    {
        $allowed_path = $this->is_install
            || $this->is_backend
            || in_array($this->path, array('login', 'logout', 'forgot'));

        if ($this->is_maintenance && !$allowed_path) {

            if (!$this->isFront()) {
                $this->redirect('/');
            }

            $this->outputMaintenance();
        }
    }