Fix invalid credentials test