Fix some SAR key bugs.
Fix some issues with login/SAR-URL access.