delayed client init
moved some logic from controllers to api client.
moved some logic ..