UserDiscriminator and FormFactory refactoring