created a check_login_simple function