Merge pull request #1878 from wikimedia/twoFactorFixes

Authored by montehurd <montehurd@users.noreply.github.com> on Oct 12 2017, 9:30 PM.