Redirecting on login failure

Utilising second doc I mentioned above you can utilise a rule and modify its code to redirect the user to a certain url after unssuccessful login event.