Move credentials into separate table and wrap usage in DB lock