cleanup session and provide logout logic