updated redirect files to properly exit on redirect. also resetting session header code to empty after use