Added pack method for handshake and fixed varint

Also added file for login