I am not positive, but I think you are trying to access the $_SESSION variable data from the client side. That variable is only accessible from the server side code.
The session_id is passed back and forth to the browser, but the actual data is not.
If you want the data to be accessible on the client side, you need to convert the $_SESSION values to raw cookies with the function setcookie() on the server side.