add register and login methods