Check that `$_SESSION[ 'user' ]` is defined before using it; otherwise throw unauthorized.