I am developing a theme. I need to have a user login system, that allows users to see all contents of the application and interact with it only after they login (not admin panel login).
I need to redirect all traffic at start to a login.php page instead of wordpress "home" (page.php), if users are not logged in. Otherwise land in "home".
What is the right way to do that in wordpress without using plugins?