Fix login/register issue