add debug info in authentication