Issue #159 - add session check