fix bug with service function.
moving authentication into home controller logic.