renamed public to avoid mixup with any compiled folders
refactored for less troublesome structure
Fixed middleware stack for creating, and ending sessions