Cleaned up node server code and added team auth.