changed to get_or_generate_username