Fix login after a session expired [#11763]

Resolves #11763 where a user could not log back in with the "your session expired" modal due to a 401 permission denied error. 

Also includes the constant that I've proposed in #11748 for the include check for connectors.