2 hours are enough. Just make sure you got to the right check-in counters. If your flight is operated by Lufthansa you will find the check-in counters for all US-bound flights in Terminal 1 Hall B and not in Hall A. If the flight is UA operated the UA counters are in Hall B, too.