Moving the authentication and 'call API method' parts from the Restler::handle() method to external methods, so they can be easily extended if needed.