I've got a PHP login script that uses LDAP for authentication. As it is now, it just sets $_SESSION['user'] based on the result of the LDAP query. Obviously just checking that $_SESSION['user'] is set is not a good way to secure things as it can be easily guessed. What's a good way to make it secure?