Indexed $this->sockets and $this->user

Added an index on $this->user->id for both $this->sockets and $this->user, which improves the processing time and simplifies the code.
Merge pull request #11 from blondie101010/patch-3

Indexed $this->sockets and $this->user