Logging for sessions.

LMS-6630
Couldn't this be written as a middleware that just patches `request.session` if it exists? That way, you wouldn't need to replace the existing session middleware, you'd just be augmenting it.