fix user management bugs