fixed authorization cache

 and added a junit test case and abstracted out the github api client