I have two applications: a Next.js 14 app deployed on Vercel, which handles all pre-login pages, and a React app deployed on Firebase that manages all post-login routes. I want to integrate these two apps under the same domain. Specifically, I need guidance on:<p>1. How to set up routing so that users can seamlessly navigate between the Next.js and React<p>2. Managing user authentication using Firebase—how can I ensure that when a user logs out, they are redirected to the login page on the Next.js app?<p>3. Any additional best practices for integrating these two frameworks effectively.