function update() 
   for k, v in ipairs(getElementsByType('player')) do 
       local money = getPlayerMoney(v) 
       setElementData(v,"Money",money ) 
   end 
  
        for g, v in ipairs(getElementsByType('player')) do 
        local gang = getElementData(v,"spawnedAs") or "N/A" 
        setElementData(v,"Class",gang ) 
    end 
end 
setTimer(update, 100, 0) 
 
That function is really inefficient, reasons: 
1: You are looping twice, that's not required, you can use the same loop for both. 
2: You are using a 100 ms timer, that's not efficient at all. 
About your problem, where's the login part?