check for non-JSON requests, missing fields and duplicate usernames