Add wss support and reconnection