added an api to update user details via JSON