more robust login
Merge github.com:hudora/appengine-toolkit into HEAD