fixed 2 bugs

we need to use the current site in case we get logged out