fixed login/register errors