User Login with server-side validation in Django

Hello sir,

In the login view, we have created an exception that if we provide the wrong email address, it should return a “This email does not exist!! Please Register” message. but if I enter the wrong email it is showing " matching query does not exist." in the debug screen and in the tutorial also the tutor did not solve this error. I tried solving the error using the ‘filter()’ function instead of ‘get()’ as shown in the tutorial, but after that, it doesn’t show the error for the password.
below is my code-
def loginUser(request):

if request.method == "POST":

    uemail = request.POST["uemail"]

    upass = request.POST["upass"]

    user = Userr.objects.get(Email=uemail)

    if user:

        if user.Password == upass:

            request.session['FisrtName'] = user.FirstName

            request.session['LastName'] = user.LastName

            request.session['Email'] = user.Email

            return render(request, "index.html")


            message = "Password is incorrect"

            return render(request, "login.html", {'msg': message})


        message = "This email does not exist!! Please Register"

        return render(request, "login.html", {'msg': message})

please let me know how we can display an error msg for both the wrong email and the wrong password.