Use credentials only if user and password are not empty