added redirect option for logout and for pages