fix bugs in client websocket implementation; basic connection working