updated database schema and add templates for login logout