Refresh the authorization using client.js?onload

Load client.js asynchronously, and refresh authorization using the onload url param.
This seems to fix some race condition...