// Setup the user information.
SpadgerConfig config = SpadgerConfig.getInstance();
out.append("<script>var Spadger={");
if (req.getUserPrincipal() != null) {
SpadgerUser userInfo = SpadgerUser.findSpadgerUser(UserServiceFactory
.getUserService().getCurrentUser().getEmail());
out.append("\"user\":")
.append(GSON.toJson(new PageEmbedableSpadgerUser(userInfo)))
.append(",");
}