code: private String fixPortletPath(HttpServletRequest request, IPortalUrlBuilder urlBuilder) {
          String path = urlBuilder.getUrlString();
          String context = request.getContextPath();
          if (StringUtils.isBlank(context)) {
              context = "/";
          }
  
          if (!path.startsWith(context + "/f/")) {
              return path.replaceFirst(context, context + "/f/" + loginPortletFolderName);
          }
  
          return path;
      }
docs: This entire method is a hack! The login portlet URL only seems to load correctly if you pass
  in the folder name for the guest layout. For the short term, allow configuration of the
  folder name and manually re-write the URL to include the folder if it doesn't already.
  
  <p>This is terrible and needs to go away as soon as I can find a better approach.
  
  @param request
  @param urlBuilder
  @return