logout feature implemented

for both UI and backend