move controller code to services
user edit form
add $resource tests