The below example would work in CB Content Module. It keeps track of their page views using browser local storage. At 10 views it'll redirect to the login page.
Code:
const limit = 10;
let views = localStorage.getItem( 'numberOfVisits' );
if ( views === null ) {
views = 0;
}
if ( views >= limit ) {
localStorage.setItem( 'numberOfVisits', 0 );
window.location = '[cb:url location="login" /]';
} else {
views++;
localStorage.setItem( 'numberOfVisits', views );
}
Change the limit to whatever you like. Render the module on any page you want their view tracked. CB Content Module can also be purchased individually from our addons page below.
www.joomlapolis.com/addons
Would this be sufficient for your needs or are you looking for some sort of login modal window popup instead?