Log Login-activity, db.sql fix

Logging stuff works now :D