handles XOAUTH2 endless loop, fixes #27