Updating login logic to exclude double login prompt.