//this is all you have to do to support 'remember me' (no config - built in!):
//token.setRememberMe(false);
try {
currentUser.login( token );
//if no exception, that's it, we're done!
log.info("username logged in is: " + token.getUsername());
} catch ( UnknownAccountException uae ) {
//username wasn't in the system, show them an error message?
log.info("Username wasn't in the system");