added authentication check to router initialize