api: implement update user api