Default Bootloader with password

Even if you have any anti theft installed in your android phone and lose your phone , the stealer can easily wipe off everything by accessing bootloader with volume keys. By this way you cannot track your phone.
Bootloader is written specific to the hardware by manufacturers but there are number of open source bootloaders like u boot. Now my question is how to put password for bootloader?, What programming language is used in bootloaders.?Where can I find source code?