Welcome to Nikonians! Since the D5100 is an entry level body many of the features and dedicated buttons on the higher level bodies were ommitted to keep the low price point. Using a non-Nikon Speedlight even though it may be i-TTL capable may be contributing to your problem.
It sounds like the function (fn) button included on the D7000 and higher bodies is what you are looking for. The function button can be assigned to control one of about twelve options including "Flash Off" which will prevent the built-in Speedlight or a Speedlight in the hotshoe from firing when the fn button is pressed. The D7000 also has a penta-prism viewfinder, a Sub-Command dial, dedicated buttons so settings can be easily changed on the fly without going into the camera menu. It also supports All AF Nikon F mount lenses with the exception of the 80mm f/2.8 and the 200mm f/3.5 designed for the F3AF back in 1983. It will also support metering with AI, and AI modified Manual Focus Lenses. The D7000 also has Commander mode included in the built in Speedlight. Good Luck and Enjoy your Nikons!