Got ordering of scripts right. Extract idp_authentication.js