try to delegate the click event for the login button