Fixed the logout function

Wonders of learning api is when you see an old tutorial you
waster an hour wondering why something isn't working when you
find out that it's just because a method is depreacted