fixed oauh logic