docs: private String getLoginFormURL(HttpServletRequest req, HttpServletResponse res) throws IOException {
  
          CmsHttpAuthenticationSettings httpAuthenticationSettings = OpenCms.getSystemInfo().getHttpAuthenticationSettings();
          String loginFormURL = null;
  
          // this will create an admin user with the "right" site root already set
          CmsObject adminCms;
          try {
              adminCms = initCmsObject(req, res, OpenCms.getDefaultUsers().getUserAdmin(), null, null);
          } catch (CmsException e) {
              // this should never happen, if it does we can't continue
              throw new IOException(
                  Messages.get().getBundle().key(
                      Messages.ERR_INVALID_INIT_USER_2,
                      OpenCms.getDefaultUsers().getUserAdmin(),
  
                      null),
                  e);
          }
          // get the requested resource
          String path = adminCms.getRequestContext().getUri();
          CmsProperty propertyLoginForm = null;
          try {
              propertyLoginForm = adminCms.readPropertyObject(path, CmsPropertyDefinition.PROPERTY_LOGIN_FORM, true);
          } catch (Throwable t) {
              if (t instanceof CmsVfsResourceNotFoundException) {
                  // if we can't read the property from the path, try to use the resource init handlers to find the
                  // resource to read it from
                  CmsResource alternativeResource = null;
                  try {
                      // use null as the response to avoid side effects like redirects, etc.
                      alternativeResource = initResource(adminCms, path, req, null);
                      if (alternativeResource != null) {
                          propertyLoginForm = adminCms.readPropertyObject(
                              adminCms.getSitePath(alternativeResource),
                              CmsPropertyDefinition.PROPERTY_LOGIN_FORM,
                              true);
                      }
                  } catch (Exception e) {
                      LOG.error(e.getLocalizedMessage(), e);
                  }
              }
  
              if (propertyLoginForm == null) {
                  if (LOG.isWarnEnabled()) {
                      LOG.warn(
                          Messages.get().getBundle().key(
                              Messages.LOG_ERROR_READING_AUTH_PROP_2,
                              CmsPropertyDefinition.PROPERTY_LOGIN_FORM,
                              path),
                          t);
                  }
  
              }
          }
  
          String params = null;
          if ((propertyLoginForm != null)
              && (propertyLoginForm != CmsProperty.getNullProperty())
              && CmsStringUtil.isNotEmpty(propertyLoginForm.getValue())) {
              // login form property value was found
              // build a redirect URL using the value of the property
              // "__loginform" is a dummy request parameter that could be used in a JSP template to trigger
              // if the template should display a login formular or not
              loginFormURL = propertyLoginForm.getValue();
              params = "__loginform=true";
          } else if (!httpAuthenticationSettings.useBrowserBasedHttpAuthentication()
              && CmsStringUtil.isNotEmpty(httpAuthenticationSettings.getFormBasedHttpAuthenticationUri())) {
              // login form property value not set, but form login set in configuration
              // build a redirect URL to the default login form URI configured in opencms.properties
              loginFormURL = httpAuthenticationSettings.getFormBasedHttpAuthenticationUri();
          }
  
          String callbackURL = CmsRequestUtil.encodeParamsWithUri(path, req);
          if (loginFormURL != null) {
              if (!loginFormURL.startsWith("http")) {
                  loginFormURL = m_linkManager.substituteLink(adminCms, loginFormURL, null, true);
              } else {
                  callbackURL = m_linkManager.getServerLink(adminCms, path);
                  callbackURL = CmsRequestUtil.encodeParamsWithUri(callbackURL, req);
              }
          }
  
          return m_authorizationHandler.getLoginFormURL(loginFormURL, params, callbackURL);
      }