// redirect on successful login if (data['clientState'] == 'AUTHORIZED') { if (getURLparams()['redirurl'] != undefined) { window.location = 'http://'+getURLparams()['redirurl']+'?refresh'; } else { window.location.reload();