Fix a bug on connect with login
Merge pull request #6 from dsciamma/master

Fix a bug on connect with login