add login and logout for backend