Backport bug 713926 - add CSRF protection to login form.