Encapsulate login item (de)registration code in a separate class.
Use helper initialiser in all constructors.
Refactor application to use LoginItem class.