Refactor UserManager