login/register error handling