implemented let for script, successful login, and unsuccessful login