completed json building in rest user controller