why is there an infinite loop
User *find_user(const char *name, const User *head) {
    User *curr = (User *)head;
    while(curr != NULL){
        if (strcmp(curr->name, name) == 0){
            return curr;
        }
    }
    return NULL;
}