redirect user to the main page if he has already been logged in