Hi guys!
After having gone through this process several times, and after having had to answer this question several times, I decided to write a blog post about it.
The gist of the post is you need to overlay the login page under /libs, and then make some adjustments to the login.jsp. After that you also need to make a couple of OSGi config changes so that AEM will redirect to your overlayed login page.
To see full details please read more here:
What does it take to customize the AEM login page? | 约瑟 https://52lina.wordpress.com/2019/10/19/what-does-it-take-to-customize-the-aem-login-page/#q2
Have fun!
約瑟。