Added user registration and authentication