Added external login support.