Heroku adaptations

not to be merged immediately, just a record of my progress on this
(it basically works, not really secure)