Fixes auth not working on domainfactory.