created an onLoadComplete function. fixed the check for user kicked out