fix signout, add random match function