moved API operations from redirect controller to session controller
deleting a file