fixed non-logged in users not redirecting to home page