Created method tryLogIn()