Got authentication half working. On the login page, if you enter an email and a password that is not currently saved in the database, and click sign up - then you will be signed up. If you then click logout, you will logout. If you then enter the same email and password and click login, you will login. All the basics are there. Now i need to store the logged in state, and show/hide various elements based on that.