Improvements and cleanup to the password API and SPI
Add credential parameter callback, and add constructors for credential callback