Integrate modal with credentials js
More useful error messages
Fixes and add subdomain variable