redirect not logged user and little bugfix