     path
 
   receiveMessage: (event) ->
-    console.log(event)
+    console.log('auth.receiveMessage')
     if event.origin == @expectedOrigin()
       if event.data == 'redirect'
         window.location = "#{@endpoint}/auth/handshake?redirect_uri=#{location}"

      false

  setData: (data) ->
    @storeData(data, Travis.sessionStorage)
    @storeData(data, Travis.storage) unless @userDataFrom(Travis.storage)
    @set('user', @loadUser(data.user))

    @set('user', undefined)

  signIn: ->
    console.log('auth.signIn')
    @set('state', 'signing-in')
    url = "#{@endpoint}/auth/post_message?origin=#{@receivingEnd}"
    $('<iframe id="auth-frame" />').hide().appendTo('body').attr('src', url)

  autoSignIn: ->
    console.log('auth.autoSignIn')
    data = @userDataFrom(Travis.sessionStorage) || @userDataFrom(Travis.storage)
    @setData(data) if data

