some fixes on user management