fixing a bug in remote user authentiation