major changes in session handling