ws restart
client reconnect
js client refactor to be nicer