complete refactoring of the get_user_by_uri function