added pg to production group, sqlite to development
added some logic for restricting logic based on authentication