Detection of liveness for fraud prevention