fix logout bug (stop redirecting to homepage)