I have a simple php login file that just checks that the user has entered the correct username and password from an array of usernames and passwords. Once they login correctly it redirects them to a new site. But the problem is that site can easily be accessed if it is just typed into the url. How do you make a script that checks the user has logged in?