refactored authentication into separate method to DRY up the jenkins methods