In 2.8.1 there were a few checks added based on exception text to provide useful error messages on LOgin screen. But exception text can have typos or change over the time. We should instead check for exception types like:
NoKnownSaslMechsProvidedException instead of "SASL Authentication failed. No known authentication mechanisms"
and so on.