added user registration and authentication