another approach to fix login/register