Native PHP-LDAP login. Optimizations. Added session-handling.