Update logout code to redirect to index.php