add loop break

break up if the page is redirected 5 times in a row