docs: public void logout() throws IOException {
  
          String loggedInUserName = getRequestContext().getCurrentUser().getName();
          HttpSession session = getRequest().getSession(false);
          if (session != null) {
              session.invalidate();
              /* we need this because a new session might be created after this method,
               but before the session info is updated in OpenCmsCore.showResource. */
              getCmsObject().getRequestContext().setUpdateSessionEnabled(false);
          }
          // logout was successful
          if (LOG.isInfoEnabled()) {
              LOG.info(
                  Messages.get().getBundle().key(
                      Messages.LOG_LOGOUT_SUCCESFUL_3,
                      loggedInUserName,
                      getRequestContext().addSiteRoot(getRequestContext().getUri()),
                      getRequestContext().getRemoteAddress()));
          }
          getResponse().sendRedirect(getFormLink());
      }