rework of bl auth library -- previous lib was causing probs on stdout write