Refactor user controller