checked check-username api to also export a function for checking if a username is taken