refactor authorization response handling in to 3 functions
document the access_token and refresh_token flow