added logout functionality to backend