I have a login page which returns a response , after which im setting a token in localStorage.
const login = async (e) => { e.preventDefault(); try {