add rest loan controller
and many tests