determining query string for post-login