fixed bug in giving people access to the database