Refactoring of code
 - Configuration od LDAP in server.ini is in own section [LDAP]
 - Removed parameter u_name from many places.
   Use session->username for this purpose.
 - Converted indentatation using spaces to tabs.