Refactoring how authentication against github works