int create_user(const char *name, User **user_ptr_add) {
    // check if the name is longer than the length limit.
    if (strlen(name) > (MAX_NAME - 1)){
        return 2;
    } 

    // find the position to add the new user with name name while checking to make sure no other 
    // user has that name.
    User **latest_user = user_ptr_add; 

    // No current users
    if ((*latest_user) == NULL){
        // create new user using calloc - will initialise all the structs internal elements to NULL
        User *new_user = calloc(1, sizeof(User));
        if (new_user == NULL) {
            // calloc failed
            perror("create_user calloc");
            return -1;
        }
        // set the name of the new user
        strncpy(new_user->name, name, MAX_NAME);
        new_user->name[MAX_NAME - 1] = '\0';

        (*latest_user) = new_user;
        printf("successfully added user\n"); // TESTING 
        return 0;
    }

    // find the latest_user added
    while((*latest_user)->next != NULL){
        if (strcmp((*latest_user)->name, name) == 0){ // another user already has this name
            return 1;
        }
        (*latest_user) = (*latest_user)->next;
    }
    // found the last user 
    if(strcmp((*latest_user)->name, name) == 0){ // last user has the same name
        return 1;
    }
    // create the new user and add to the list
    User *new_user = calloc(1, sizeof(User));
    if (new_user == NULL) {
        // calloc failed
        perror("create_user calloc");
        return -1;
    }
    // set the name of the new user
    strncpy(new_user->name, name, MAX_NAME);
    new_user->name[MAX_NAME - 1] = '\0';

    (*latest_user)->next = new_user;

    printf("successfully added\n"); // TESTING

    return 0;
}
add new users at the end of the list user_ptr_add