Added login check to getBalance as well.