fixed login, except the error handling
Merge pull request #17 from MarkTonkinson/master

fixed login, except the error handling