Refactor github authentification