Session state

See 579f947eec297f6c7afa702b44ce0075c4c0c29f
Please report bugs.