Fix PHP Error for session checking

PHP will throw a lower-level error when checking the validity of a
variable that doesn't exist. To alleviate this, we check to see if it's
isset in an or statement before checking it's true/false state so it
fails the first test.