Use a function to get security level.
Fixed bug, Was getting layers out of the database incorrectly.  setOnionLevel also no longer calls bugged restrict function.