fixed newline issue and sending to server from go client
remove client when connection closes
Merge pull request #1 from siyegen/master

Fixes for the demo