minor commit, now the fallback when you want to redirect the user to the previous page but there's no referer, is to redirect to the main page, at the same time i've removed the hardcoded /  and replace it by the basehost given by the configuration file which should be more generic