Added code to register user & edit profile.