more tests, and fixed role bug for registration