I am using the Casper theme for my site and I have member-only posts enabled. When I try to sign in from a members-only post, then a new about:blank tab opens. The login popup also shows, but I first have to close the new tab which is quite annoying. I am a beginner in web development, but I figured that there is an extra event listener on the “Sign up” buttons and “Sign in” link. (See image below)
The script could be coming from one of two places. First, it could have been entered in Settings → Code Injection → Site footer. Second, it could be somewhere in the theme, likely in default.hbs. It would be near the bottom of the file.
The script checks if the link in question matches the hostname (!a.test(link.href)). This means, e.g., does mysite.com/about match mysite.com. If it does, then the link is skipped.