Login should know what it's taking as input. As it stands, you're calling a function and that function is *assuming* that instance variables or params is available instead of taking the username and password as arguments.