Modified get_user function