use rwmutex in sessions