Save sync_code to localStorage, check to see if it's there, otherwise generate a random one