fixed some small bugs and added role management