an example on consolidating logic in the steamlogin function