Converted getUserId request to JQuery