It depends on what airline you are flying where you will go through immigration. Airlines other than United use the main terminal.
But if you have a multi-day layover, you should be able to check your bag just to IAD anyway. And no matter what, you need to collect your bag to go through customs in your first U.S. port of entry.