Added registration and authentication