Fixed subdomain login and reistration bugs