Added sign out and device not found handling.