UserCredential refactoring