LogActivities, Login fix, db.sql

LogActivities displays logs from a new dable in db.sql
Double code in login is fixed and I want you all to look at it so we
don't write double code anymore