logout.php file, and simpler redirect function

logout.php file, and simpler redirect function