get redirect url and get access token