User module refactoring