Added server side logic for sign up and login.