If a user types "Login authentication failed" in chat, regardless of if the IRC connection has actually failed, it will trigger the fatal logging and return from the active loop.
A suggested fix could be to check to make sure it was not sent via a PRIVMSG
if text.find('Login authentication failed') > 0 and text.find('PRIVMSG') == -1:
https://github.com/PetterKraabol/Twitch-Python/blob/60b52bd8ce35136bb0c3e640616726077ca7c15a/twitch/chat/irc.py#L35-L37
If a user types "Login authentication failed" in chat, regardless of if the IRC connection has actually failed, it will trigger the fatal logging and return from the active loop.
A suggested fix could be to check to make sure it was not sent via a PRIVMSG
if text.find('Login authentication failed') > 0 and text.find('PRIVMSG') == -1: