Save and load user preferences.