Use $location for query string detection

Now that we don't use hashbangs.