How to create an app that can only be signed up by a targeted group?

You must have your teachers in the database. Encrypt their password. Create a number for each teacher in your database. Make your apk available on the school website. Also keep information if the teacher is active or inactive at school.