changed check for login
Merge pull request #118 from apatel/master

changed check for login