added api method to update profile and password