title: Cross-subdomain login management
body: <p>we have a login-protected web app built on one platform and a public-facing website built on another. The public site is meant to promote the web app, which people can access once they sign up.</p>
  
  <p>Right now we have the public site under the root domain: ourwebapp.com, and the app under the subdomain app.ourwebapp.com. Login/authentication is handled by the app, but we want to streamline the user experience so that if they go to the root domain, but are logged-in to the app, then the root domain will redirect them to the app url. </p>
  
  <p>An example is Netflix. If you are logged in with netflix and navigate to netflix.com, it will automatically redirect you to the login-protected movies.netflix.com url.</p>
  
  <p>Is there a generic way to implement something like this? </p>