I am new to javascript and wrote a simple extension to parse the gmail atom feed and display the number of unread emails.
My problem is if for some reason you're not logged into your google account, the extension attempts to check the feed and Safari will display a login box like this.

And since I check every 10 seconds these prompts stack up and hijack the browser to the point where you can't go login. Also loggin via this prompt seems to do nothing.
Is there anyway to ignore failed attempts to read the feed? My request looks like this:
xmlHttp = new XMLHttpRequest();
xmlHttp.open('GET', url, true);
xmlHttp.onreadystatechange = checkForNewMessagesCallBack;
xmlHttp.send(null);