Fixed redirects when not logged in