Fixed broken level-lock implementation
put the locks as close to the beginning of function as needed
called unlock()'s when cb was called (created cb wrapper)
shortened unauthenticate()