refactor user REST API.