back-end check for username and email