use localStorage for variables instead of cookie