user creation logic for client