add additional checks for xoauth2 handling