Working on preauth framework