fixed session management so its accessible to all classes