   Disconnect callbacks
 ###
 
-UserStatus.events.on "sessionLogout", (doc) ->
+UserStatus.events.on "connectionLogout", (doc) ->
   # Remove disconnected users from lobby, if they are there
   TurkServer.Lobby.removeUser(doc.userId)
 
 disconnectCallbacks = []
 
-UserStatus.events.on "sessionLogout", (doc) ->
+UserStatus.events.on "connectionLogout", (doc) ->
   return unless doc.userId
   # No side effects from admin, please
   return if Meteor.users.findOne(doc.userId)?.admin


connectCallbacks = []

UserStatus.events.on "sessionLogin", (doc) ->
  return unless doc.userId
  # No side effects from admin, please
  return if Meteor.users.findOne(doc.userId)?.admin

  Connect callbacks
###

UserStatus.events.on "connectionLogin", (doc) ->
  # Update ip address in assignments for this worker
  user = Meteor.users.findOne(doc.userId)
  return if user?.admin
