Implemented code for stopping services and dismissing notifications on logout.