Fix double login prompt issue