class ParseUser extends ParseObject {

  public static Task<ParseUser> logInInBackground(String username, String password) {
    if (username == null) {
      throw new IllegalArgumentException("Must specify a username for the user to log in with");
    }
    if (password == null) {
      throw new IllegalArgumentException("Must specify a password for the user to log in with");
    }

    return getUserController().logInAsync(username, password).onSuccessTask(new Continuation<State, Task<ParseUser>>() {
      @Override
      public Task<ParseUser> then(Task<State> task) throws Exception {
        State result = task.getResult();
        final ParseUser newCurrent = ParseObject.from(result);
        return saveCurrentUserAsync(newCurrent).onSuccess(new Continuation<Void, ParseUser>() {
          @Override
          public ParseUser then(Task<Void> task) throws Exception {
            return newCurrent;
          }
        });
      }
    });
  }

  public  ParseUser();

}