Automatically logs out after clicking "logout"