Added debug info. Check for 401 instead of 200.