Fixed Errors in user registeation and login