localstorage and redirection