Updated trials controller to add id upon creation