Clearing old sessions when the application exits