added error handling for if the username doesn't exist