Refactoring users controller