Midterm elections may seal fate of Obama's legacy