Simplifying code: wrapping/unwrapping session id is redundant