BUG Issue with login form failing to login in certain situations. Fixes issue #2424
Merge pull request #2480 from tractorcow/pulls/3.1-dologin-security-fix

BUG Issue with login form failing to login in certain situations. Fixes ...