Testing cookie session storage
Added useCookies setting to control whether cookies are saved and loaded