Prevent bad state after a failed login
Fix charset name