hub: added function to check for hub credientials before running

* so they won't be stored in $HOME whereever