Fix simple demo

Add missing connect instruction to make simple demo work.
Maybe the creation of the client should be moved outside of the
functions like in the websocket example.