profile and registration. unit tests. optimized for server