Refactored code: changed the way user information is passed throughout the app