Use User preferences too to get the api key

In User.preferences use the thesaurus_api_key to set the key.