-Refactored logout.php
-Fixed bug in messagepage.php