Best Practices for combing static site with Anvil App?

Have you tried creating a separate app for the login, and changing your main app to redirect to the login one instead of showing the login form?

If that works (I haven’t tried) you could have two different container pages, one with the iframe optimized for the login app and one for the app itself.

I don’t think Anvil supports redirecting, but it should be possible with a little javascript (again, I haven’t tried).

As a side note, it is possible to remove target="_blank" from the Anvil links to avoid them to open in a new tab (this I have tried, both in a custom component (if a form has the custom component then the target="_blank" is removed from all the links in the page) and as in a role assigned to a link).