Tests for cleaning up old sessions

#208 

I have implemented the cleanup session logic, but this needed some tests.