Tidy up code regarding account activation