When you're trying to diagnose problems or looking into possible user misbehavior, it's hard to correlate events and sessions from the database with data from the access log. For the access log you can include the JSESSIONID. But the session number there is different from the session number in SAKAI_SESSION. The first is the sakai session, the second is the usage session.
This patch puts the sakai sessions ID in the REF field of the login event, thus allowing you to map between the two IDs