Oddly, I just figured out the solution shortly after posting here (even though I've been at this for a few days)! Interestingly, the API is correctly referring the user to a login page. However, for some unfathomable reason, the iframe for the container is invisible!
Basically, the JS API loads a view into its container by loading it in an iframe. For whatever reason, when it loads the login page, the iframe is set to be 1x1 px and invisible, which isn't going to help anyone.
To fix this, I just added this line of JS after the code that initializes the view:
document.querySelectorAll("iframe").forEach(elem => elem.setAttribute('style', 'width:100%; height:100%; visibility:visible;'));
This sets the style so that the login page becomes visible. Of course, this sets the style for all iframes, so if you're using iframes in your markup, you may have to do something fancier or switch to other HTML element containers.