I have managed to get some code running before the view is accessed and this works as I can see the console printouts. However, I am struggling to return a response instead of h