Fix race condition about sjcl not being loaded yet in login()