     @param {Object} user Firebase user.
     @private
   ###
-  listenServerChanges_: (user) ->
+  fetchAndListenServerChanges_: (user) ->
     userJustLogged = true
     @userRef.on 'value', (snap) =>
       return if @isLocalChange_
-      console.log 'onServerValue'
       val = snap.val()
 
       serverUserExists = val?.user?.uid


    , (error) ->
      # TODO: Report to server.
      if goog.DEBUG
        console.log 'The read failed: ' + error.code

  ###*
    @param {Object} user Firebase user.

  onUserLogin: (user) ->
    @userRef = @userRefOf user
    @setUserLastOnlineOnDisconnect_()
    @fetchAndListenServerChanges_ user

  ###*
    @private
  ###
  setUserLastOnlineOnDisconnect_: ->
    @userRef.child 'user/lastOnline'
      .onDisconnect()
      .set window.Firebase.ServerValue.TIMESTAMP

