PHP login and $_SESSION

I have an existing webapp in php and js and I am trying to add authentication to it. I have figured out the part on how to create a login page and authenticate against my organisation’s LDAP server …