Okay, so I'm not 100% sure what the best way to implement this is. I want to create my own little webapp that requires a login to work. I know how to authenticate, that's not the problem.
Either my index page redirects to a login.php page and allows you to log in then redirects you back to index or the index page detects that you're not logged in and instead of redirecting you, takes it upon itself to print a login form instead of the main content. Not sure if that's clear.
What are the advantages/disadvantages of each.
Thanks in advance!
(I'm thinking of using OpenID but forget about that for now, I'm just curious about what the best way to implement a login system from scratch is, with a separate page or everything in the index)