Tweaked code to allow direct creation of UserRole records.