add a function of create new user and fix some bugs of save as and delete an image