fixed push and tag for private registries

- my recent change broke pushing for private registries, this is now fixed
- similarly, tagging was not working for private registries, this too is fixed