Did Abraham Lincoln serve a congressional term before becoming president?

He was a Congressman from Illinois.