Working out the log out and destroying a session