I’ve blanked out the keys in your code here, please don’t share these in public as they compromise your app or account. I recommend changing them in the developer dashboard.
Can you be more specific about “not authenticating properly”? What error code are you seeing?
Have you added your login URL to the callback URLs section in the developer dashboard?