Making the auth script functional