handled changing classes when using the session variable

also updated mailgun