Refactoring of users manager.