Fix to authentication filter