Please go through this below link where you will get a FileMaker solution having Custom user login template.
Hope this solution will work for you.
Instead of, I want to design a form login layout (in database A) . When user open Database A, they have to input user name and password and click Login, and then it will take them go to the default layout on Database B.
Yet that sounds exactly like what will happen when FileMaker security pops up asking for an account name and password. How will this layout be different from that? What problem does it solve for you?