Update main.js

Added handle for save password in settings