Modify check user name fn to take in username as a parameter