I tried out your first example of HTML with the CSS in Codepen and it looks fine https://codepen.io/philgyford/pen/EaxpqXg?editors=1100
So there is either something different in your template compared to the code you supplied, or there is other CSS affecting the layout. You’ll need to use your browser’s Inspector panel to look at various HTML elements in the page to see what CSS is affecting them.
As for why the two pages are different… I haven’t tried the login page HTML, but I can see some differences in the HTML and CSS classes – if you want them to appear the same, you’ll have to ensure they have more identical HTML.
