bind login function and LoggedIn variable to controller