Added method to register a new user