System.out.print("submitted username is: " + username);
System.out.println(", submitted password is: " + upToken.getPassword().toString());
checkNotNull(username, "Null usernames are not allowed by this realm.");
String password = null;
//try {
User user = UserService.getUser(username);
password = user.getPasswordEnc();
System.out.println("retrieved password is: " + password);
//password = Safe.getPassword(username);
//} catch (Exception e) {System.out.println(e);}
return new SimpleAuthenticationInfo(username, password.toCharArray(), getName());
//new SimpleAuthenticationInfo(username, "blue".toCharArray(), getName());