Added authentication and registration