Fixed is_logged_in redirect loop