Thanks for the replies. Luckily I managed to avoid the dreaded 401 error.