Major refactoring of error handling.
Updated Login implementation and styling.
Replaced sra with auto.