Adds back end check for log in

fixes #2
Merge pull request #4 from ryandang/issue2

Adds back end check for log in