It depends on what king of authentication you are using. if you just want to redirect to the login page if the user is un authenticated the you will have to do 2 things. I am making an assumption that you will use the HTTP Basic Authentication
1. Go to /system/console and navigate to the Configuration. Select "Apache Sling Authentication Service". Disable Anonymous access.
2. Go to /libs/cq/security/config.publish/LoginSelectorHandler - Change the login page to the page you want.