I have a community for employees using the Company Community license. I have built a custom log in page for my community users to log into it automatically.

The problem here, is that when I redirect from my cname to my custom log in page, it automatically throws the user into the salesforce standard log in.

I cannot seem to make it work, can someone help me out with this?

Thank you.