Limit useraccess with webproxy

I have the following basic wired setup:
client (192.168.3.X) —> (192.168.3.88/ether2) router (192.168.4.1/ether1) —> webserver (192.168.4.77)
The client has an already assigned IP and are currently using 192.168.3.88 as gateway

I want the router to intercept when the client tries to access the webserver and force the user to login.
The examples found and help from AI are often incomplete for this scenario and/or is missing information.

I have verified that the client could reach the webserver before I started to experiment.

Have anyone tried to create something similar and can help me out or know of a good resource?