created the logout to handle the logout