Sure enough it is getting set properly... so why doesn't it work when you write it on the page? Do that same var dump in the body instead of the top of the page. It seems like the session is getting removed somehow, but I don't see where.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.