connected admin and staff pages to the database