In terms of order, the only thing you have to keep in mind is the structure itself. Separate the PHP scripts from HTML , and so on.
You should also bear in mind that HTML scripts will only be responsible for static content, if you say that this is an online store, you do not have to force HTML and JS for PHP tasks, and likewise, there is no reason to force PHP to generate large amounts of code < in> HTML , since you can use it, and I recommend that you use files with the .php
extension, even if they are only responsible for the login form, I think a few bytes will not make that much difference.
In any case you would not be properly organizing your code, you would be organizing the files. To organize the codes I recommend that you use classes or simply functions, because it is an online store, all security is tight , just remember this.
If you want, and you will definitely want to improve the structure, you must use ready-made structures, because besides being programmed by professionals, thousands of people have evaluated them, or if you prefer to go old, you will have to do it much more effort than choosing where to put the login form.