docs: public Session login() throws RepositoryException {
          assertStateAfterOrEqual(State.CREATED);
          final Session session;
          if (username != null && password != null) {
              session = getRepository().login(new SimpleCredentials(username, password.toCharArray()));
              userSessions.put(username, session);
          } else if (anonSession == null) {
              anonSession = getRepository().login();
              session = anonSession;
          } else {
              session = anonSession;
          }
          return session;
      }