Repairing broken login/register