I think I have found an alternate solution. This code was to force IE9 to emulate IE8 as it was caching the password protected pages - they were still there even after clearing the cache! Earlier versions of IE were working fine, I did some reading and it seems to be a fairly common problem. I have now inserted some code to prevent the page from being cached, this seems to be working now.