fixed bug with registration logging out in the home page + some tests