MT#5599 Fix pwd-based api auth.