Added onSetSession callback to sessionStore
Refactored setSession method