Fixing issues with logging out and test which wasn't being called!

Signed-off-by: Ben Corlett <bencorlett@me.com>