massive update, lots of work, login seems to be (mostly) working.