Add database test and fix protected worker routes