PHP to check login on View.php