Added logged in/logged out logic to templates, added email testing backend, other small changes