Use the hostname as part of the account key
This avoids some collisions if you have multiple domains but the same username.
Also took the liberty of adding a settings version, as that's kind of an expected thing.
This is the first C++ I've written in like 15 years, so it's probably a mess. Apologies up front!