changed login.is_guest() to function