Restore remote server behaviour

This should be the final PR to restore the remote server behavior.  The cloud and remote behavior have been moved into separate functions.

It also contains code to modify the root logger, so that passing --debug to the gui on the command line actually causes the gui to display debug messages.