Improve delete and save document
Fix login