fix bugs introduced by the new login