Simplification of credential creation function.