Added auth check to the alg ctrl