Add socket API auth

TODO: Clean up the socket events