fixing registration and authorization