bugfix
adding function to convert list of roles to something more usefull
optimied sql query for allowed, added logging, and cache