fixes to get connect working with internal and app users