A few thoughts on the above:

Guns: These are generally not a Good Idea on planes fullstop. The last thing you want is someone blasting away at 15000 feet, whether it be the pilots, armed guards or the hijackers themselves. Holes in the shell of the plane are generally not what you are going to want. And windows will not stand being hit by bullets. Maybe it could be slightly more feasible to arm the pilots with low powered rounds which would not penetrate the plane shell. But then, would they useful enough against hijackers? What about arming the pilots with seriously debilitating electric stun guns?

Cabin -> cockpit communication: Lets say the pilots are behind a bulkhead, and uncontactable except for a red button for Land This Bird Now. Whats to stop the hijackers using a cellphone or radio transmitter and contacting air traffic control ordering them to communicate with the pilots? ("Tell the pilots to change course to xxx or we start killing passengers"). The problem is not that the hijackers should not be able to talk to the pilots, its that the hijackers should not be able to directly influence the plane's flightpath in anyway. Putting the cabin crew in contact with ATC would make the bulkhead pointless as the hijackers simply demand the cabin crew to get ATC to contact the pilots. This is a really difficult issue to solve.

Changing plane course: What about this: Give the Captain a secret key code, the co-pilot a secret key code and a specially trained anti-terrorist passenger a secret key code (this passenger is not known to the crew, the pilots or anybody on the ground who is contactable). The plane has an inbuilt flight plan which CANNOT be diverted from, unless there is a fuel shortage, a mechanical problem or another Sitatuation: which would require the Captain, the co-pilot AND the mysterious passenger to input their key codes into the plane. If there is a problem onboard (ie: hijacking), anti-terrorist operative onboard simply remains anonymous and is trained to not provide his/her code NO MATTER WHAT. Just an idea. Difficult to implement, yes. Leaves room for Mr Computer Genius Terrorist to over-ride the code system etc.

If it was easy to secure planes, they would be secure. Its a really difficult task and requires a security chain incredibly long to remain secure.