Added new endpoint to check user credentials. Emails are now sent on a new thread, speeding up background operations.