added redirects for nonlogged in users