Update LoginController.java

checkLength() method included into controller.