Added back User authentication and rest of pin code in controller and index file