user controller refactored