Would be nice to unify the credential handling so only one of these method has to be used and not both.