Add logout logic