modified client: added user reg and login