Detect when websocket connection fails

Closes #134
Merge pull request #137 from TheUnknownOne/design

Detect when websocket connection fails