header.php and index.php bugfixes

I believe I nailed down the infinite redirect loop. Be on the lookout
for any more, but I definitely got one. Apparently, and I didn't know
this till just now, but you should place exit; statements after all
header() function calls. If you think about it, it makes sense -- your
user is leaving that page and that page should stop execution
immediately