Added a logout.php and fixed sessions