Fixed Logging out issues