Both are fine. the first few things that come to mind.
1.The Nikon uses a superior Sony image sensor, not opinion, it's a fact.
2. The Canon has an auto focus motor, this particular Nikon does not. So you need to make sure the lenses you buy have a motor, or no auto focus. Nikon does not include AF motors in entry level dSLRs. This is not an issue with Canon or Sony Alpha.
3. The D5100 might be replaced soon, and the T3i has already been replaced by the T4i.
Nikon might not replace the 5100, or not exactly, they are known for leaving particular lines to die away and replace them with something below it or above it. The D300 never got replaced directly, but by the D7000 that sits below it, and the D700 was replaced by the D800 but again, not directly, it's a totally different camera.
If you go Nikon, wait a bit longer, if there is a replacement then the price of the 5100 will soften up a bit, avoid the D3200 at all costs if you plan on shooting in low light. It has 24 megapixels but it comes at a price, image quality suffers as the ISO is increased. If you go Canon, don't go above the entry level dSLRs for better image quality, because you won't get it. Canon sticks the same image sensor in everything from the bottom to the 7D, only go up the chain for features.