Moved session id checking into stack from individual transactions