Added Error Handling For Registartion and Login