improved debug information when authentication fails