#463 changes to support better secure socket.io

Resolves #463