beforeLoad redirecting to our login even when user is authenticated properly - TanStack