added subdomain middleware
fixed session persistance issue
added basic view tests