Added authentication and msg serialization