Lots of user-related bugfixes