How to avoid out of Stock products to redirect visitors on the login page of magento
Update
On my Website the products are available even though they are out of stock and when a user clicks on them, it redirects them to the login page.
For Example: I am a user of this website. I want to buy a product : Sugar. When i click on "sugar" this redirects me directly at the admin panel login page of magento.
the configuration from the admin panel is :Admin >> System >> Configuration >> Catalog >> Inventory >> Stock Options Display Out of Stock product -> No
but still they are on website. How to give users a 404 error page in this case?