refactored accesslevel and user role functions.  created accesslevel directive