fixes a bunch of tests, adds user login capabilities