Saving token in localstorage now, various fixes