Move set_thread_credentials_permanently() to set_thread_credentials()