use socket ids instead of usernames for keys
remove unnecessary username argument, clean up a little