Prevents notice errors if $_SESSION isn't set
Adding additional testing of whether variables exist
Merge pull request #1 from weotch/patch-1

Prevents notice errors if variables aren't set