protected function setUserFromSession()
    {
        $id = $this->session->get();

        if ($id) {
            $user = $this->repository->getById($this->session->get());
            if ($user instanceof UserInterface) {
                $this->admitUser($user);
                return;
            }
        }

        $this->currentUser = new GuestUser();
    }