added resetOnLogout option