redirect loop was actually higher up in the page