You are adding credentials everytime. For calls like `ps`, `images` or `run`, it is not needed. It might be interesting to add a parameter to the function in order to set or not the credentials.