added not-logged-in redirect
minor mistake fixed
that's what you get for blindly copy-pasting