title: Spring. Java. Log in and activation email
body: <p>I have a "chicken egg" problem.
  In application I use UserDetailsService to get User (we don't store user information in our DB, we use third party service to actually get all information).</p>
  
  <p>Recently we've added account activation feature. After registration, we send an activation email to a user and if he clicks on it, we mark the User as ACTIVE and redirects him to log in page. User can login only if he has ACTIVE status. The problem is: we'll start charging user from the date he activates his account even if he never logs in. How can I (maybe using spring security) make those processes (activation and login) almost simultaneous? We don't want to charge user if he just activates his account, we want to charge him only if he has logged in (after activation). So can I actually do it somehow "user clicks activation link, login and then his status is changed to ACTIVE (but he can login only if he is ACTIVE)".</p>
  
  <p>Sorry if my problem description isn't clear enough  </p>
  
  <p>I'll appreciate any feedback.</p>
  
  <p>Thanks!</p>