registration and authentication fixes