updated the users api handler