Moved functions for checking login status to a file called loginStatus.php