Add profile resource, Fix session management