Changing auth function to accept strings.