Ensure invalid credentials raise an exception.