Detect if previously connected and the socket is still alive.
Fixed typo
Check if already logged in when called again during the same instance
Merge pull request #95 from jonnywilliamson/master

Detect if previously connected and the socket is still alive.