Added login check for each route change