completed logincommand.java functionality