Hopf automorphisms and twisted extensions