renamed Profile.as_dict to Profile.to_json and add information in the dict return. refactor profiles api to use the new method