adding login functionality