authentication support and better debug info