Added the tokens/email functionality, checking for existence of user upon registration, and automatic redirection of authenticated users to homepages.