check for messages existence moved to header.php