Enable basic auth if username/password in config.

@invisiblefunnel does this look right?