pass env as second argument to on_establish

This lets on_establish modify it's behavior based on things like cookies or query args.