fix #1 and login weirdness