I've written a code in C++ for a bio-metric lock which I want to add to the log in screen beside the password.
Any idea from where should I start?
PAM is probably the way to do this. However, keep in mind that PAM works as a stack of modules, they get run and as soon as one says "yeah you're authenticated" you get signed in. You can mess with the ordering in some pam config file (that I can't remember off hand). Once you make this a PAM module, lightdm will automatically use it for authentication.