Replace ganaric curl with Moodle curl, add sesskey to mybadges actions