added routing and authentication