This problem has no solution. Either the cockpit door is beachable or not. There is no in-between or half measure that allows forced access under certain conditions.
Let us not forget the reason this was brought in. Terrorists are still our biggest threat. The fact that we are even debating the door issue is testament to how effective it has been. You need to decide what you want to defend against and go with that, you cannot have it both ways.