Made smart constructor for UserProfile.