Lock the app with a PIN

I wanted to lock the app with a PIN. So i've implemented this functionality. If you want, you can merge it into your repo.