[bugfix] Fix handling of badtoken response for login actions
[bugfix] Fix handling of badtoken response for login actions

Fail early (before handling 'badtoken' which needs to be logged in)
if 'badtoken' error code and login in process.

Bug: T248768
Bug: T248767
Bug: T224712
Change-Id: I2c61eba72559cc27d88506bafeb46fe814f80f6f

wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core,wikimedia/pywikibot-core