The US president rallied in states that Republicans previously won - showcasing how tight Tuesday's elections could be in determining control of Congress.