Fixed constructing redirect url after user authenticates.