added websocket auto reconnect behaviour