Block page based on payload response

I have a website which the default page is asking for Username and Password

I want to block this page if in the response payload the BIG-IP detects the fields of Username and Password

But, it the payload does not contains Username and Password, then the page will not be blocked by BIG-IP

What is the best way to achieve this goal?

irule should do the trick i believe, some hints

https://devcentral.f5.com/questions/irule-to-block-http-content

give it a try