Adds auto reconnct and ping (fixes #3)
Merge pull request #10 from wraithan/reconnect

Adds auto reconnect and ping (fixes #3)