users controller refactored