Open Question: Obtaining a real estate license in Michigan?

How would i go about earning a real estate license in MI? How long would it take? Do i have to take the classes online or can i do them in person? Do you know of any accredited course, or are they all the same? If i move out of MI is would my real estate license still be valid? Thanks!