Add Hash class, fill in some LoginPacket functions
small fix, data type correction