Changed NameCheckController to return json instead of text