Added state code to the auth URL.
Generate random state code and save it in persistent storage.