First time users to app redirects

Not sure if there’s a topic on this but I want to make users who visit my app for the very first time and are not logged in go to a splash page. But if the user has visited before and isn’t logged in it will redirect to the login page. I’m not sure if I’m making sense but it makes sense in my head.

If your visitor is not logged in, you can’t know if he is a user. So it is technically “very hard” to know for sure if someone that is not logged in is or isn’t a user of your app.

The only way I imagine to do it, is saving your users IP in your database or saving a cookie in your user’s browser. Then you will know, when they return, if they already signed up.

There are some plugins that are very simple to use that work creating and consulting cookies in browser….