Obey Allah , and obey the messenger and those of you who are in authority ; and if ye have a dispute concerning any matter , refer it to Allah and the messenger if ye are ( in truth ) believers in Allah and the Last Day . That is better and more seemly in the end .