basic layout and redirect handler