Added settings saving on logout