Implemented save settings to local database and server.