login functionality part1