works (added logout)