Fix to lookup of domain on login