making authentication creation more generic