[eluser]CroNiX[/eluser]
Take a look at the sess_destroy() method in the session library. It already unsets userdata, etc., but then you do it manually on a session that doesn't exist anymore since you just destroyed it. You then set_userdata, again, on a session that you just destroyed. You might try creating a new session right after you destroy the old one, or just unsetting the userdata which in effect destroys the session and not use sess_destroy().