fixed a bug in capturing referer when signing in