Updated logic to updated user name in the nav bar