Exception handling in external login