Implemented websocket auto reconnect