Swap localstorage with Firebase