optimized for server: spa api for profile and registration made. correction of cors headers