added localstorage support to hold tokens accross page refreashes