Return db conn, cur from init_db function
Moved init_logging out of main loop, add disconnect
Adding a script to run user-based stats