I have used both before, but the Canon T3i briefly only because it was school owned. First thing I wanna point out is, Nikons and Canons definitely feel different when you hold them in hand. Maybe it’s my lack of experience, but I felt like Canons are easier to point and shoot with auto-focus, so maybe it’ll be better for an entry level photographer? I am definitely not a pro at any of this as I have lots to learn still, but this is just how I feel personally. The resolution for the Canon is 18.00 Megapixels, while the Nikon is 16.20 megapixels. Also- If you are looking price-wise, the Canon T3i is a tad cheaper, but only by a $100 to the Nikon D5100. If you’re looking for the pop-out screen, both have this feature. :)
All in all, I think the Canon T3i is a better deal if you are buying your first camera.