(function(){
const pathname = window.location.pathname;
const needLoginPage = ['pages/prescriptions', 'p/my-prescriptions'];
const noLoginPage = ['/account/login', '/account/register', '/account/resetpw'];
if(!noLoginPage.some(item => pathname.includes(item)) && needLoginPage.some(item => pathname.includes(item))) {
window.location.href= "/account/login";
}
})()