added and refined authentication added flash messages, added post-> author relationship