fixed some linking things, and realized that I shouldn't return a pointer to authentication_data as it will be hard to free