code: public void createUser(String email, String password, final SimpleLoginAuthenticatedHandler completionHandler) {
      if (!Validation.isValidEmail(email)) {
        handleInvalidEmail(completionHandler);
      }
      else if (!Validation.isValidPassword(password)) {
        handleInvalidPassword(completionHandler);
      }
      else {
        HashMap<String, String> data = new HashMap<String, String>();
        data.put("email", email);
        data.put("password", password);
  
        makeRequest(Constants.FIREBASE_AUTH_CREATEUSER_PATH, data, new RequestHandler() {
          public void handle(FirebaseSimpleLoginError error, JSONObject data) {
            if (error != null) {
              completionHandler.authenticated(error, null);
            }
            else {
              try {
                JSONObject errorDetails = data.has("error") ? data.getJSONObject("error") : null;
                JSONObject userData = data.has("user") ? data.getJSONObject("user") : null;
                if (errorDetails != null) {
                  FirebaseSimpleLoginError theError = FirebaseSimpleLoginError.errorFromResponse(errorDetails);
                  completionHandler.authenticated(theError, null);
                }
                else if (userData == null) {
                  FirebaseSimpleLoginError theError = FirebaseSimpleLoginError.errorFromResponse(null);
                  completionHandler.authenticated(theError, null);
                }
                else {
                  String userId = userData.getString("id");
                                  String uid = userData.getString("uid");
                                  String email = userData.getString("email");
                  FirebaseSimpleLoginUser user = new FirebaseSimpleLoginUser(userId, uid, null, email, false);
                  completionHandler.authenticated(null, user);
                }
              }
              catch (JSONException e) {
                e.printStackTrace();
                FirebaseSimpleLoginError theError = FirebaseSimpleLoginError.errorFromResponse(null);
                completionHandler.authenticated(theError, null);
              }
            }
          }
        });
      }
    }
docs: Create a Firebase "email/password" user.
  
  @param email Email address for user.
  @param password Password for user.
  @param completionHandler Handler for asynchronous events.