add auto re-connect for websockets