Migrated from leejo project

Orignal session layer used in
[leejo](https://github.com/opensourcehk/leejo) project. Helper structs
and interface for creating service layer.