correcting errors to auth script