Login functionality updated