This question is about some basic(classical) results on Atkin-Lehner-Li theory of newforms. Let $f$ be a (normalized) newform of level $N$ and character $\epsilon$. Denote the $n$th Fourier coefficient of $f$ by $a(n)$.
As Li proved in her paper in 1975 (Theorem 3, Newforms and Functional Equations, Math. Ann. (link), if $\epsilon$ is induced by a character modulo $N/p$ and $p^2$ does not divide $N$, then we have
$$ a(p)^2=\epsilon(p)p^{k-2}. $$
If we denote the Atkin-Lehner involution by $W_p^N$ (the precise definition of this appears on p. 74 of Ribet and Stein's lecture note, https://wstein.org/books/ribet-stein/main.pdf), then we have
$$ f|W_p^N|W_p^N=\epsilon_0(p^{\alpha})f, $$
where $\epsilon_0$ is the character modulo $N/p^{\alpha}$ induce $\epsilon$ and $\alpha=\mathrm{ord}_p(N)$. If $p^2$ does not divide $N$ as before, then $\alpha=1$.
Since $T_q$ commutes with $W_p^N$ if $q \not\mid N$ (the proof is given on page 288, Li75), we can conclude that $f|W_p^N$ is also a Hecke eigenform.
On the other hand, in page 521 of Choie and Kohnen's 2009 paper 'The first sign change of Fourier coefficients of cusp forms', American Journal of Mathematics, it is given without proof that
$$ a(p)=-w(p)p^{\frac{k}{2}-1}, $$
where $w(p)$ is the eigenvalue of $f$ under the Atkin-Lehner involution $W_p^N$. First of all, why $f$ is also an eigenfunction under $W_p^N$? I would like to find the proof or a reference.
Meanwhile, if I believe this fact without proof, then we can derive
$$ w(p)^2f=\epsilon(p)f $$
so that $w(p) \in \{\pm1\}$. It is obvious that $a(p)=\pm w(p) p^{\frac{k}{2}-1}$ from Li's result, but I still don't know how we determine which sign is correct.