Client login and connection bugs fixed and added zindex sorting for drawing entities