added login check to loadFromServer