adding login code