Fixes to disconnection logic for multiple disconnections, also add full unhandled exception logging to console in websocket server