Communicating via USART with an AVR - Input Buffer?
What I have done in some projects is to use a circular buffer that is filled by an ISR triggered by a UART.

So when the UART receives a byte, an interrupt is triggered and the handler loads that byte to end of the buffer.

Then in the main loop you can check if there is any bytes in the buffer and execute each command that has been queued up.

Lots of info on circular buffers in teh internet.

Cheers.