Adding the redirect function to backend and frontend. Also fixing a spacing issue with the block function