TITLE: Constructing a group automorphism making a diagram commute
QUESTION [5 upvotes]: Let $A,B$ be groups, suppose we have an epimorphism $p:A \to B$. Let $\phi \in \operatorname{Aut}(A)$. 

Does there exist some $\varphi \in \operatorname{Aut}(B)$ such that the following diagram
\begin{array}{c}
A & \xrightarrow{\phi} & A \\
 \downarrow{p} & & \downarrow{p} \\
 B & \xrightarrow{\varphi} & B
\end{array}
commutes? 

My thoughts: Take $b \in B$. Since $p$ is surjective,
there is some $a \in A$ such that $p(a) = b$ (the possible non-uniqueness of such an $a$ might be a problem). Then try to define $\varphi(b)$ as $p(\phi(a)) \in B$. 
If we fix some $a_b \in p^{-1}(b)$ for each $b$ with the properties that $a_{b_1} a_{b_2} = a_{b_1 b_2}$ (**) (not sure we can do this), then the construction might work:
$\bullet$ $\varphi(b_1) \varphi(b_2) = p(\phi(a_{b_1})) p (\phi(a_{b_2})) = p(\phi(a_{b_1} a_{b_2}))$. Since $a_{b_1} a_{b_2} = a_{b_1 b_2}$ $\varphi$ is a homorphism.
$\bullet$ $\varphi$ is maybe injective and surjective (I haven't checked this as I'm not sure of (**)) Also we might need the property that $\phi^{-1}(\{ a_{b} : b \in B\}) , \phi (\{ a_{b} : b \in B\})  \subseteq \{ a_{b} : b \in B\}$.
There seem to be too many properties required for it to be true!!
Edit: The answer is indeed no, as it was pointed out in the answer by user1729, unless $\phi( \ker(A \xrightarrow{p} B)) = \ker(A \xrightarrow{p} B)$.
This example is just to make sure I understand the construction correctly.
Example: Suppose that there is a surjective morphism $p:A_1 \times A_2 \to B$ and that $\phi: A_1 \times A_2 \to A_2\times A_1 (\cong A_1 \times A_2)$ is just a permutation of the factors. The kernel $N$ of $p$ can be embedded as $N_1 \times N_2 \subseteq A_1 \times A_2$. Then $\phi(N) = N$ clearly, and so there is a $\varphi$ making the diagram commute.
(Is the above example correct?)

REPLY [2 votes]: No. In essence, you are claiming that if $\Phi:A\twoheadrightarrow B$ then $\operatorname{Aut}(A)\rightarrow \operatorname{Aut}(B)$, which does not hold. It does hold if the kernel of $\Phi$ is characteristic, that is, if $\phi(N)=N$ for all $\phi\in\operatorname{Aut}(A)$ (for example, if $\Phi$ was the abelinisation map). However, your proposition does not hold in general.
So, here are some hints to finding a counter-example:
Hint:

Take $A$ and $B$ such that the kernel of your projection map $p=\Phi$ is not characteristic.

Spoiler 1:

 Take $A\cong H\times H$, and take $B=H$, where $H$ is an arbitrary (non-trivial!) group. What should the automorphism be here? What should the projection map be?

Spoiler 2:

 Further, take $\phi:(g, h)\mapsto (h, g)$ and take the projection map $p:(g, h)\mapsto g$. So $\phi$ swaps the factors but the projection $p$ just looks at one of them.