Added basic login/logout and registration with confirmation email support.