docs: protected Session login(String repositoryId) {
          LOGGER.debug("--- login: " + repositoryId);
  
          if (context == null) {
              throw new CmisRuntimeException("No user context!");
          }
  
          Session session = sessions.get(repositoryId);
          if (session == null) {
              HttpServletRequest request = (HttpServletRequest) context.get(CallContext.HTTP_SERVLET_REQUEST);
              if (request != null) {
                  //try via http authentication
                  try {
                      session = jcrRepository(repositoryId).login(new ServletCredentials(request), workspace(repositoryId));
                      sessions.put(repositoryId, session);
                      return session;
                  } catch (CmisPermissionDeniedException e) {
                      LOGGER.debug(e, "Cannot authenticate using http authentication");
                  }
              }
              //http authentication didn't work, try std authentication
              String userName = context.getUsername();
              String password = context.getPassword();
              Credentials credentials = (userName == null)
                      ? null : new SimpleCredentials(userName, password == null ? "".toCharArray() : password.toCharArray());
  
              try {
                  session = jcrRepository(repositoryId).login(credentials, workspace(repositoryId));
                  sessions.put(repositoryId, session);
              } catch (Exception e) {
                  throw new RuntimeException(e);
              }
          }
          return session;
      }