Adds token based authentication

* system now recognizes the issued tokens (valid until the app is
  shutdown)