code: @Override
      public User createUser(String username, String password)
              throws AuthenticationException {
          String user = file_store.getProperty(username);
          if (user != null) {
              throw new AuthenticationException("User '" + username
                      + "' already exists.");
          }
          // Encrypt the new password
          String ePwd = encryptPassword(password);
          file_store.put(username, ePwd);
          try {
              saveUsers();
          } catch (IOException e) {
              throw new AuthenticationException("Error changing password: ", e);
          }
  
          return getUser(username);
      }
docs: Create a user.
  
  @param username The username of the new user.
  @param password The password of the new user.
  @return A user object for the newly created in user.
  @throws AuthenticationException if there was an error creating the user.