auth.js - update error logging