 //requireAuth is a custom route property     if (next.$$route.requireAuth && user == null ) {        event.preventDefault(); //prevents route change       alert("You must be logged in to access page!");      }     else {       console.log("allowed");     }  