finish user api writes tests