began login functionality