wrote the login script