updated database to have username foreign keys