Modularized authentication subs