Login functionality fix