Fixed bug to dismiss OAuth popup after authenticating