Added sorting, cookie secret from ENV