Add UserManager to cope with rights, add unit test