Refactor edit user to separate directives