How to detect a human behind the glass?
If the glass is IR transparent and the only moving thing on the other side of the glass is warm-blooded, you could use a passive infrared (PIR) motion detector. 

If the glass isn't IR transparent (or even if it is) you could use an LDR configured to detect fast-ish changes in illumination from the other side of the glass.