testing updates, login/register fixes, refactor