session class fixes and tests
session class fixes and tests