Completed grant flows implementation and testing