Fix a few things in the build script
fix #68 - session expiration