Added logic to update the users profile