Major refactoring
Support authentication with docker api