newpost only after login

prevent the navigation to the newpost view if user is not logged in.