A helper function for comparing Origins
Token accessibility test
Referer-based check