You are opening a whole new can of worms with this. Where there is a will, there is a way. If the terrorists wish to get inside they will. Plastic explosives, blow torch, posing as pilots with stolen key cards for access, etc. Bank vaults and safes were once considered impossible to crack and now we have more advanced robbers.
Also costs not feasible because cockpit would have to be very big. Pilots will need berths to sleep, room to get up and stretch their legs, and most importantly- how would they get their food during flight? A sliding window liek they serve prisoners? Terrorists could even poison pilots and plane would go down on their own anyway.
------------------
"Fly me to the moon and let me earn alot of miles."