add register and login support