patches for the remote client, to support servers on different URLs
more fixes