isLoginValid implemented