protected function init()
    {
        $this->loadModules();

        $this->session = $this->container->get('session');
        $this->csrf = new CSRF($this->session);
        $this->user = $this->getUserFromSession();

        $this->request = Request::createFromGlobals();
        
        // Auto regenerate_id on specified intervals
        $this->sessionTimeoutCheck("sessionInterval", "_migT", false);
        // Enforce absolute maximum duration of a session
        $this->sessionTimeoutCheck("sessionTimeout", "_start", true);
        // Invalidate session if it is idle for too long
        $this->sessionTimeoutCheck("sessionIdle", "_idle", true, true);
    }