added tests and finished registering of users