You can now set credentials in environment variables.

To enable this we now look for credentials associated with the hostname only.
We fall back to using the the entire URL for backwards compatibility.

Also we needed to replace ALL `.` characters with `__`.