International Code of Ethics for order of co-authors in research papers In many cases it so happens that multiple workers are involved in a research problem under the supervision of group leader. We will assume that group leader is the corresponding author of a manuscript. Now, I have the following queries: 


Who will decide who the first author will be? I am talking about a scenario when all the co-authors are PhD holders. If there is a dispute, who has to resolve and how? 
Who decides the sequence of co-authors in the manuscript, first author or corresponding author? Is there any international code of ethics in this regard? 
Again, we have to assume that it is practically impossible to quantify the contributions of respective co-authors in a well-funded, well-qualified research group. And qualification sometimes comes along with ego. How can the corresponding author decide that the second co-author has contributed more than the third co-author, and the ordering will not change (whosoever had decided based on point 2)?
The meaning of author order varies across fields. In some fields, authors are listed alphabetically. In others, the order reflects some sort of perceived contribution. Some people prefer to be the last author.

The only unified code, and it is unwritten at that, regarding author order, is to talk to your authors and be considerate to their feelings. It is academic misconduct to leave someone out as an author. Similarly, it is wrong to list someone who should not be an author. This means that it is up to everyone to decide. If your research group is so disfunctional that this is hard, have those conversations at the start. In fact, I advise everyone to have those conversations at the start and during the process just to keep hard feelings from developing.