Fix a bug with broken link testcase for login in when redirected to login page. Also cleaning up the textbox for email id before writing to it