agility.sql: rework DB to join user/session/events tables. AuthManager
server-side code mostly written