add login controller functions: step 1