Fixes for external login process