Authentication using hand motions