moved login decision to layout component