Enable basic auth if username/password in config.
Better username and pass variables
Fix merge conflict.