Refactored login code, storing user data in session, better errors

Put login in a waterfall, now storing user information upon login (see #8), better error handling.
The rationale behind it was that it was a critical message that needs "immediate action" to fix, that closing it doesn't remove the X marks in the inputs (possibly confusing the user) and that it cannot become cumbersome because there is nothing to do in that modal other than login.