Fixes #3601: Use secure websockets if available
[untested] make encrypting websockets a setting