Fixing login() function after flash updates