user authentication token generates when user is created and added a cors preflight check to allow cross site methods