added oauth login redirect logic