Switch to secure API (no more cleartext/digest passwords).
Drop unnecessary cast.