implemented a basic register, works with login and cookies