Implemented Authorization Code grant flow