Refactor how the credentials are handled in the process of building a
service.