fix var replacement upon login