Replaced java.util.base64 with org.apache.commons.codec.binary.Base64 for Java 7 compability