added redirection to manage fun if not logged in