Update main.js

Adding local storage