Added z-index 1 to login box.

For some weird reason, the text boxes suddenly became inaccessible both in
Chromium and in Firefox. Specifying z-index resolves the issue.
Reorganized functions in main. Dashboard is now authenticated properly.

BUT the authenticating function is not yet fully working. Need to check on
sending request with cookies.
Accessing cookie via dict's get method since if user is not logged in, KeyError leads to status 500.
Unhashable type morsel issue solved.

Use the .value attribute of the cookie map contents (Morsel.value).
Log-in now pretty much working.
Code cleanup.