refactor user controller for clarity