fix oauth flows and test contacts api