implement user validation