add factory modal window controller
add user service and refact code