where are authenticate() and login() defined? what's the difference between the two?