LoginBox and minor changes