refactor user controller