somewhat clumsy logout button implementation.