Use the new session feature to create and reuse sessions:
https://docs.cypress.io/api/commands/session
The first time `login` with a given name is called
the steps described in the login function are performed
and cookies and localstorage are cached.
The next time `login` is called with the same name
cookies and localStorage are restored and used again.
This allows us to keep fast test runs
while still separating the tests more cleanly.
The old logout command was broken because of the way
we used `Cypress.Cookies.defaults({ preserve })` before:
Cypress runs all the `cy.*` commands during initialization
and builds a list of commands that are then executed during the tests.
However `Cypress.Cookies.defaults` is evaluated when preparing the list
not while performing the actual steps.
Signed-off-by: Azul <azul@riseup.net>