Firm up login logic.
Guard against sql error due to type mismatch.
Merge branch 'master' of github.com:kellyk/b3