   history.replaceState(null,'',window.location.href.replace("#{location.hash}",''))
   if get_cookie 'access_token'
     console.log 'Read access token cookie: ' + get_cookie 'access_token'
+  else
+    $('h1').after $('<div>').attr('class','alert alert-warning').attr('id','oauth_access_warning').append('You have not authorized this application to access your Google Fusion Tables. ')
+    $('#oauth_access_warning').append $('<a>').attr('href',google_oauth_url).append('Click here to authorize.')
   $.ajax 'capabilities/testedit-capabilities.xml',
     type: 'GET'
     dataType: 'xml'

      crossDomain: true
      error: (jqXHR, textStatus, errorThrown) ->
        console.log "AJAX Error: #{textStatus}"
      success: (data) ->
        console.log data


  properties = $(collection).find('citeProperty')
  add_property_to_form(property,form) for property in properties

  # test table access
  if get_cookie 'access_token'
    $.ajax "https://www.googleapis.com/fusiontables/v1/tables/#{$(collection).attr('class')}?access_token=#{get_cookie 'access_token'}",
