added user registration and tests