Fix /api/user AJAX requests