code: public Session login(final String userId, final String password) throws RepositoryException {
  
          assertStateAfterOrEqual(State.CREATED);
          return this.repository.login(new SimpleCredentials(userId, password.toCharArray()));
      }
docs: Logs into the repository with the given credentials. The created session is not managed and be logged out after
  use by the caller.
  
  @param userId
  the user id to log in
  @param password
  the password for the user
  @return the {@link Session} for the user
  @throws RepositoryException
  if the login failed for a repository internal error