Improved handling of errors caused by enabling HTTPS/changing password