add function to controller home n login