some code formatting
make sure we don’t end up in endless redirect loop