Add login check to default layout.