Regarding designing a longer form
The problem with two columns forms is users would be confused by the two column layout and interact differently needing them to more time to get the task done. To quote this article
One of the problems with form fields in multiple columns is that your
users are likely to interpret the fields inconsistently.
Here you’ll see 5 different ways to interpret how the form fields
relate when they are arranged in a standard two column layout.

However with a single column layout, users just scan from top to bottom and hence can move through the form really quickly and fill the details. To reference this article which talks about the issues with single column vs multi column forms
We have forms for our city reviews, accommodation ads, etc. At the
beginning, we sketched these forms in one column, but in the final
design, we tried 2 columns because it was nicer from the design point
of view.
The problem was that the second column of the form, had required
fields. So, what happened was that the user, after filling the first
column and seeing the “Publish” button, was not realising that a
second column needed to be filled too. We started to receive daily
emails like: “Hey! I can’t publish on your site, it keeps saying me
there are fields I have to fill”. It’s important to say that we were
actually pointing with a red coloured sentence where the required
fills were, but many users were still not seeing them.
The reason because was hard for the users to publish content this way
is obvious if you check out the image bellow. This is the path the
user had to follow before and after we fixed the problem:

Regarding the login form
Since the login form has only two fields, you can get away with potentially using a two column layout since users would be accustomed to knowing the flow and know the first field is usually the Username\email and the second field is the password and hence there would be little confusion about the sequence of the flow.
The reasoning behind this assumption is that studies have shown that two column layouts are fine for specific use cases such as first name and last name or Country and state fields or date fields. To quote this article from Luke Wroblewski
There are some exception cases where the ’single column’ rule can be
broken. Users expect to see names (first and last name), dates (year,
month and day) and time (hour and minute) written on a single line.
That said, if you look at most form designs, they follow a stacked approach because a stacked approach would allow users to quickly scan the form and fill it up as the below login form examples show.



In conclusion, I would suggested going with a stacked form approach though if you decide to go with a two column approach for the login form, you should be fine. That said, You should make the call between the user quickly filling up the form and space optimization on the page.
That said, irrespective of what layout you go for, I strongly recommend reading this article on label positioning (and this smashing magazine article as well)as that would also define how your users interact with your form.