added registration and authorization