You can use localStorage to store login or register response.

Then get from localStorage on page refresh.

// AccountActivate.js
// in axios request
localStorage.setItem("auth", JSON.stringify(data));

Now get from localStorage in context

// context/auth.js
  useEffect(() => {
    let fromLS = localStorage.getItem("auth");
    if (fromLS) setAuth(JSON.parse(fromLS));
  }, []);

Now to remove data from localStorage, you can manually clear data by opening browser dev tools > Application > Storage > Clear site data