OpenID: fix failure to store selected e-mail address in the db.
Fix post-SSL login redirect.
Merge pull request #37 from mgorny/bugfixes

Bugfixes