Expose Session attributes, make it a case class, close #950