Fixes authentication against LDAP server

Adds a flag to decide wether or not to hash the user's password.
Thanks @ThomasChiroux for the patch!
Dynamically load module information

Optimizes initialization time by only loading modules information when
it's needed.
Thanks to @ThomasChiroux for the patch!