Delete some debug output statements. Add pager.

1. delete the debug output statements in session module.
2. add a pager util in utils package.
3. add a safe counter in utils package.
4. add test files for testing the new utils.