added user and login functions