How can I get a logged user's username without the domain?
Local Domain

See Get current users username in bash? for a range of approaches:

logname


or

echo $USER


or

whoami


or

id -u -n


Network Domain

If you are on an (Active Directory) network domain, you can use

echo ${USER#*\\}


or

u=$(logname)
echo ${u#\\}


to just get the user name part.