Fix login threading issue

At the end of the Box login process, the sample app was crashing, because `[dismissViewControllerAnimated:completion:]` was being called from the wrong thread.