mostly working add user from edit page
refactor thumbnail js code a small bit