making away state and user modes persistent