Corrected logout and main page