working on the login/register functionality