add mutexes around user/usermap functions