added functionality to store last controller when activate and deactivate methods are called on remote class