Check user existence and handle errors

Add functionality to check user existence and report errors