Update index.php

fixed redirect loop, when key is expired