Complete session managemnet implementation, log commits are evil.
Small additions.