fixed some more issues with single sign-on