On smaller aircraft there's just not enough room as most front doors are very close to the cockpit entry. It maybe possible on larger aircraft but would need major work. The B747 has a toilet within the cockpit area (there is a small lobby area prior to the cockpit door).
As I posted it depends on the aircraft and airline to which further mechanism/lock was installed other than the standard. Remember the aircraft was built well before 9/11 so would have been modified to make the door more secure. If a keypad was there it would be secondary to the handle which...
Not necessarily the flight crew may have been flying it at that point. Furthermore the A320 is fly by wire, meaning all inputs are controlled by computers, it doesn't have a standard yoke in front of the pilot but a joy stick. If the stick is touched during auto-pilot mode the computers decide...