User provider refactoring