code for login automation