Throw an error if credentials bad