Session, Database and url fix

Mails can now be dynamically sent