Added database connection for users. Fixed sync button bug for Inventory.