enable two ways of authentication, simplify authentication by construct, seperate test by parent-subclass