ajax service and user service code