Only set authorization settings when a username or password are supplied.