rest api for registration and sigin.