Implementing the previous design + register, login, and activation functionality