Moved the header call to after setcookie, also added an exit statement.

Header was called before setcookie, moved this to the end of the logout section along with adding an exit; call in to stop any further code being processed.