docs: public static void logout(CmsObject cms, HttpServletRequest request, HttpServletResponse response)
      throws IOException {
  
          String loggedInUser = cms.getRequestContext().getCurrentUser().getName();
          HttpSession session = request.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. */
              cms.getRequestContext().setUpdateSessionEnabled(false);
          }
          // logout was successful
          if (LOG.isInfoEnabled()) {
              LOG.info(
                  org.opencms.jsp.Messages.get().getBundle().key(
                      org.opencms.jsp.Messages.LOG_LOGOUT_SUCCESFUL_3,
                      loggedInUser,
                      cms.getRequestContext().addSiteRoot(cms.getRequestContext().getUri()),
                      cms.getRequestContext().getRemoteAddress()));
          }
          response.sendRedirect(getFormLink(cms));
      }