Added methods inside the CredentialsWithOptionalPasswordHelper class