code: public function logoutCurrentUser() {
          $this->getAuthGuard()->logout();
          \Session::remove($this->originalUserFromLoginAsActionSessionKey);
          \Session::invalidate();
          $this->getCmfConfig()->resetLocale();
      }
docs: Logout current user, invalidate session and reset locale