Added code that updates user profile.