allow /chats/ to return JSON

mainly for convenience, it'd probably better to make it officially part of the
API