Add session loop.
Merge pull request #133 from skydb/session-loop

Add session loop.