Moved the header call to after setcookie, also added an exit statement.
Merge pull request #55 from laf/issue-48

Merge laf's update to move the location redirect