Popup window login flow using JavaScript SDK

JB940 is correct with regards to that Stack Overflow post. Also, have you tried the getToken function in the JavaScript SDK to see if it returns anything?