SELECT login, user_role FROM $table
WHERE login = '$login'
AND password = '$password'
LIMIT 1;