fixed bug with not logged in customer group, renamed some functions