I am trying to protect routes based on whether a user is logged in or not but I cannot get this to work properly since it seems that the information stored in my context pro