login with username and password functionality implement