code: public Session login(final String username, final String password) throws RepositoryException {
          assertStateAfterOrEqual(State.CREATED);
          if (!userSessions.containsKey(username)) {
              userSessions.put(username, getRepository().login(new SimpleCredentials(username, password.toCharArray())));
          }
          return userSessions.get(username);
      }
docs: Creates a login for the given username and password
  
  @param username
  the username to log in
  @param password
  the password to log in
  @return the session for the user
  @throws RepositoryException