Fix quit channel bug

We might drain our quit channel before the websocket server gets it
Concurrency test
Restructure using channels as much as possible
Fix deadlock and cleanup

In case the receiver was not ready yet, we blocked the whole chain of
command.