Added login functionality and fixed test cases

Various styling and interface changes too. Most of them are just me
being OCD.