addresses linesdotcom/lines#606
Merge pull request #4 from linesdotcom/issue/606-undefined-index-on-login

addresses linesdotcom/lines#606