Fix some gcc warnings
Fixed mingw build!!
Fixed gcc warnings and a mistake
Added support for more than one identity request reply.