working version of workflow for login