added redirection if logged