Handling authentication
Handling register request and template