Fix for the Two-Factor Authentication logic.