Added protection from cyclic redirect