Add login, logout, and register APIs