Added login check to router