Melt remaining butter into the olive oil in the saucepan. Add the onions. Cook very slowly on medium-low heat until they have deep brown color, about 17 minutes. Turn up the heat to medium-high, add the sugar, and stir for 1 minute.
Remove from the heat, add the flour, and stir well to cover the onions. Pour in the stock and chicken base, stir, place back on the heat, and bring to a boil. Turn down to a simmer and cook for 5 minutes. Add salt and pepper.
Whisk in the butter and cognac mixture and bring back to a low simmer until ready to serve.
Meanwhile, place the slices of baguette on the baking sheet. Equally divide the cheese on top of the slices and place under the broiler until the cheese is melted and bubbly.
Ladle the soup into bowls. Serve with slices of baguette with melted cheese.