added res.json if account post is xhr