Fix server URL handling (domains); better logging