You are destroying the session on top of the page and have an extra space before the code. It may just be a matter of removing the space before the code on line 1, and after the code on line 5. Extra spaces can cause issues in php.
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.