getting ready for a new approach to some stuff
refactored once again. Login almost works, browser borked.