Add pre-request hook, useful for basic auth.