added login before an action