add events to ws_closed_error in kernel.js
wait for kernel_ready after ws_closed_error