Javascript changes and template updates to edit user profile