added user business logic for register user and authenticate