remade routes and finished with encryption