Assuming that the user has logged previously and that we have a valid refresh-token stored in a cookie, when we start the application again, user will be null until the token is refreshed.
Since user is null, any protected route will be redirected to login.
How do you usually wait for the first refresh to complete so the user is not redirected to login?