user controller refactoring