Better would be
!isset($_SESSION['userid'])
- a session variable might be set to the value 0, in which case !$_SESSION['variable'] would give the wrong result. May not be relevant in this case (is there a User Zero?) but where's the percentage in being a boy racer?
The only irritating thing about setting/unsetting session variables through the $SESSION array seems to be some sort of (de)referencing bug (which has been logged). unset($SESSION['var']); doesn't work; one has to go $_SESSION['var']=null; instead.