refactor user controller and routes