SASL authentication ending correctly
Merge pull request #490 from CoryChaplin/fixes

Fix for #489